<!DOCTYPE html>
<?php

/**
 * @author Dulshan Kalpage
 * @copyright 2011
 */

//start the session
session_start();

//we need to capture and release header already sent messages
//ob_start();

?>
<div class="padd_30">
<h1>Login to the members area</h1>

<!-- remember to point to the process script -->
<form action="loginUser.php" method="post" name="loginForm" id="loginForm">

    <p><label for="username">Enter Username:</label></p>
    <p><input type="text" name="username" id="username" /> </p>
    <p><label for="pword">Enter Password:</label></p>
    <p><input type="password" name="pword" id="pword" /> </p>
    <p><input type="submit" name="submit" value="login" /></p>

</form>
</div>

<div>
    Not a member yet? What are you waiting for??? <a href="Register.php">Register here</a>.
</div>

<?php 
if (isset($_SESSION['message']))
{
    echo $_SESSION['message'] .'<br>';
    
    //invalidate the session cookie
    $_SESSION = array();
    //ob_end_flush();
    
    //end session
    session_destroy();
}
?>


</body>
</html>










